import type { MenuProps } from "antd"

export type MenuItem = Required<MenuProps>["items"][number]
export interface GlobalMenuOption {
	label: React.ReactNode
	key: React.Key
	icon?: React.ReactNode
	children?: MenuItem[]
	type?: "group"
}

export interface MenuInfo {
	key: string
	keyPath: string[]
	item: React.ReactInstance
	domEvent: React.MouseEvent<HTMLElement> | React.KeyboardEvent<HTMLElement>
}

export interface SelectInfo extends MenuInfo {
	selectedKeys: string[]
}

export type SelectEventHandler = (info: SelectInfo) => void

export type SiderTheme = "light" | "dark"
